package cn.wsalix.biz.service;

import java.util.List;
import java.util.Observer;

import org.springframework.data.domain.Page;

import cn.anlaser.service.SimpleService;
import cn.anlaser.type.ImageTypeEnum;
import cn.wsalix.biz.entity.ImageFile;
import cn.wsalix.biz.entity.RelationImage;
import cn.wsalix.biz.form.ImageFileForm;
import cn.wsalix.biz.repository.ImageFileRepository;

public interface ImageFileService extends
		SimpleService<ImageFileForm, ImageFileRepository, ImageFile>, Observer {
	Object findFkByForm(String imageType, Long fkId);

	public List<ImageFile> findByFkId(Long catId, Long fkId);

	public Page<ImageFile> findPageByFkId(Long catId, Long fkId);

	/**
	 * @param relationId
	 *            新增关联图片
	 */
	public void addRelation(Long imageId, Long fkId, String imageType);

	/**
	 * @param relationId
	 *            删除关联图片
	 */
	public void deleteRelation(Long relationId);

	public List<RelationImage> findRelationImage(String imageType, Long fkId);

}
